<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>用户列表(vue)</title>

</head>
<body>
<div id="app">

    <table>
        <thead>
        <tr>
            <th>序号</th>
            <th>用户名</th>
            <th>密码</th>
        </tr>
        </thead>
        <tbody>
        <tr v-for="(user,index) in users">
            <td>{{index}}</td>
            <td>{{user.username}}</td>
            <td>{{user.password}}</td>
        </tr>
        </tbody>
    </table>
</div>


</body>
<script src="../lib/vue.global.js"></script>
<script src="../lib/axios.js"></script>
<script>
    const app = {
        data() {
            return {
                users: []
            }
        }, mounted() {
            axios({
                url: 'http://localhost:8080/rest/get/1',
                method: 'delete',
                dataType: 'json'
            }).then((res) => {
                //   this.users = res.data;
                console.log(res.data);
            })

        }
    }

    Vue.createApp(app).mount('#app');

</script>


</html>